package models

import "time"

// User 注册，与数据库中的字段名对应
type User struct {
	UserID    int64       `json:"user_id" db:"id"`
	Username  string      `json:"username" db:"username"`
	Password  string      `json:"password" db:"password"`
	Level     int         `json:"super" db:"level"`
	Email     string      `json:"email" db:"email"`
	Token     string      `json:"token"`
	ClassID   interface{} `json:"classID" db:"class_id"`
	TeacherID interface{} `json:"teacherID" db:"teacher_id"`
	CollegeID interface{} `json:"collegeID" db:"college_id"`
}

// CodeModel  验证码
type CodeModel struct {
	Username   string    `json:"username" binding:"required,max=15,min=5"`
	Code       string    `json:"code" db:"code"`
	Status     bool      `json:"status" db:"status"`
	Email      string    `json:"email" db:"email"`
	CreateTime time.Time `json:"createTime" db:"create_time"`
}
